package 蓝桥杯算法;

public class day456 {
    public static void main(String[] args) {
        int[] arr1=new int[10000];


        int[] arr=new int[20190324];
        arr[0]=1;
        arr[1]=1;
        arr[2]=1;
        for(int i=3;i<20190324;i++){
            arr[i]=arr[i-1]+arr[i-2]+arr[i-3];
            arr[i]=arr[i]%10000;
        }
        System.out.println(arr[20190323]);
        int res=0;
        int result=0;
        //保证i<j<2019-i-j,这样三个数不存在重复
        for(int i=1;i<2019;i++){
            for(int j=i+1;j<2019-i-j;j++){
                res=2019-i-j;
                if(dif(i,j,res)&&isvalid(i)&&isvalid(j)&&isvalid(res)){
                    result++;
                }
            }
        }
        System.out.println(result);
        int resu=0;
        for(int i=1;i<=2019;i++){
            if(aaa(i)){
                resu+=i;
            }
        }
        System.out.println(resu);
        long a= 101210121012L *24;
        System.out.println(a);
        int[] ass=is(555);
        for(int i=0;i<ass.length;i++){
            System.out.println(ass[i]);
        }
    }
    public static  int[] is(int num){
       int[] arr=new int[10];
       int i=0;
       while(num>0){
           arr[i]=num%10;
           num=num/10;
       }
       return arr;
    }
   public  static boolean aaa(int num){
        int res=0;
        while(num>0){
            res=num%10;
            if(res==1||res==2||res==0||res==9){
                return true;
            }
            num=num/10;
        }
        return false;
   }
   public static  boolean dif(int n1,int n2,int n3){
        if(n1==n2||n1==n3||n2==n3){
            return false;
        }
        return true;
   }
    public static  boolean isvalid(int num){
        int res=0;
        while(num>0){
            res=num%10;
            if(res==2||res==4){
                return false;
            }
            num=num/10;
        }
        return true;
    }
}
